<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        function fn(a){
            this.a = a
        }
        var obj={}
        var getNum = fn.bind(obj);
        getNum(2);
        console.log(obj.a);//2


//使用递归求到20的斐波那契数列之和
let count=0;
function fac(n){
    count++
    if(n>0){
        if(n==1||n==2)
        return 1
    
    return fac(n-1)+fac(n-2)
    }
    if(n<=0){
        return 0
    }
}
console.log(fac(20));


    </script>
</body>
</html>